using System;
using System.Collections.Generic;
using System.Text;

namespace TelnetExpect
{
    /// <summary>
    /// An implementation of <see cref="T:AuthenticationNtlmTelnetHandler"/> that uses
    /// <see cref="T:System.Console">System.Console</see> to prompt to use NTLM.
    /// </summary>
    public class ConsoleAuthenticationNtlmTelnetHandler : AuthenticationNtlmTelnetHandler
    {

        protected override bool Prompt(string message)
        {
            Console.Write(message + " [y/N]> ");
            string line = Console.ReadLine();
            bool useTnap = false;
            if (line != null) {
                if (line.Trim().Equals("y", StringComparison.CurrentCultureIgnoreCase)) {
                    useTnap = true;
                }
            } else {
            }
            return useTnap;
        }

    }
}
